home *** CD-ROM | disk | FTP | other *** search
/ Aminet 30 / Aminet 30 (1999)(Schatztruhe)[!][Apr 1999].iso / Aminet / util / wb / startpanel.lha / StartPanel / Arexx / Miami_Prefs.rexx < prev   
OS/2 REXX Batch file  |  1998-11-05  |  2KB  |  54 lines

  1. /*     ___       ___                                                          */
  2. /*   _/  /_______\  \_     ___ ___ __ _                       _ __ ___ ___    */
  3. /*__//  / _______ \  \\___/                                               \___*/
  4. /*_/ | '  \__ __/  ` | \_/        © Copyright 1998, Christopher Page       \__*/
  5. /* \ | |    | |__  | | / \               All Rights Reserved               /  */
  6. /*  >| .    |  _/  . |<   >--- --- -- -                       - -- --- ---<   */
  7. /* / \  \   | |   /  / \ / This file may not be distributed, reproduced or \  */
  8. /* \  \  \_/   \_/  /  / \  altered, in full or in part, without written   /  */
  9. /*  \  \           /  /   \    permission from Christopher Page except    /   */
  10. /* //\  \_________/  /\\ //\     under the conditions in the StartPanel  /    */
  11. /*- --\   _______   /-- - --\        documentation, legal section       /-----*/
  12. /*-----\_/       \_/---------\   ___________________________________   /------*/
  13. /*                            \_/                                   \_/       */
  14. /*                                                                            */
  15. /* Description:                                                               */
  16. /*                                                                            */
  17. /*  This arexx script will open the Miami preferences window (ie: the Miami   */
  18. /*  window...). If Miami is not loaded then this script will attempt to load  */
  19. /*  it before sending the show command. The script requires you to have set   */
  20. /*  up the Miami: assign.                                                     */
  21.  
  22. options results
  23. ADDRESS COMMAND
  24.  
  25. DO_STDERR = 0;
  26. IF OPEN(STDERR, "CON:////Miami_On.rexx -- Error messages window/WAIT/AUTO", "w") then DO_STDERR = 1
  27.  
  28. if ~show('p', 'MIAMI.1') then do
  29.  
  30.     'wbrun Miami:Miami'
  31.  
  32.     cpt=0
  33.     do while ~show('p', 'MIAMI.1')
  34.         'wait 1'
  35.         cpt = cpt + 1
  36.         if cpt=10 then do
  37.             if DO_STDERR then do
  38.                 call writeln(STDERR, "Timeout while waiting for Maimi to start.")
  39.             end
  40.             call quit
  41.         end
  42.     end
  43. end
  44.  
  45. address MIAMI.1 show
  46.  
  47. error:
  48. syntax:
  49. quit:
  50.  
  51. if DO_STDERR then call close(STDERR);
  52.  
  53. exit 0
  54.